﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopTask")]
    public class Task : BaseObject
    {
        //begin
        public Task()
        {}
        public Task(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private string _DownloadUrl;
        public string DownloadUrl
        {
            get
            {
                return _DownloadUrl;
            }
            set
            {
                SetPropertyValue("DownloadUrl", ref _DownloadUrl, value);
            }
        }
        private string _TaskId;
        public string TaskId
        {
            get
            {
                return _TaskId;
            }
            set
            {
                SetPropertyValue("TaskId", ref _TaskId, value);
            }
        }
        private string _Status;
        public string Status
        {
            get
            {
                return _Status;
            }
            set
            {
                SetPropertyValue("Status", ref _Status, value);
            }
        }
        [Association("TaskSubtasks", typeof(Subtask)), Aggregated]
        public XPCollection<Subtask> Subtasks
        {
            get
            {
                return GetCollection<Subtask>("Subtasks");
            }
        }
        private string _Method;
        public string Method
        {
            get
            {
                return _Method;
            }
            set
            {
                SetPropertyValue("Method", ref _Method, value);
            }
        }
        private DateTime _Created;
        public DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                SetPropertyValue("Created", ref _Created, value);
            }
        }
        //end
    }
}
